############################################################################
#
# Top Makefile
#
#2018-08-20		zhangtao		File created
#
############################################################################
TOPDIR := $(shell pwd)
export TOPDIR

include $(TOPDIR)/config.mak
include $(TOPDIR)/rules.mak

#SUBDIRS = autofocus zoomtrace zoombox libmerge 
SUBDIRS = autoexposure autofocus zoomtrace  zoombox ois libmerge
.PHONY: all target install uninstall clean distclean

all: install

target:
	$(Q)for i in $(SUBDIRS); do if [ -d $$i ]; then $(MAKE) $$i || exit; fi; done

install:
	$(Q)for i in $(SUBDIRS); do if [ -d $$i ]; then $(MAKE) $$i install || exit; fi; done
	
uninstall:
	$(Q)for i in $(SUBDIRS); do if [ -d $$i ]; then $(MAKE) $$i uninstall || exit; fi; done
	
clean:
	$(Q)for i in $(SUBDIRS); do if [ -d $$i ]; then $(MAKE) $$i clean || exit; fi; done
	
distclean:
	$(Q)echo "  RM        .build"; rm -rf .build
	$(Q)echo "  RM        config.mak"; rm -f config.mak  
